package edu.sctu.practice.class02.hujie.cgs.practice02.test11;

/**
 * Created by hj on 2015/10/23.
 */
//重载：同一个方法名不同的数据类型
public class Addition {

    public int add(int a, int b) {
        System.out.println("a+b的int："+(a+b));
        return a + b;
    }
    public long add(long a, long b) {
        System.out.println("a+b的long："+(a+b));
        return a + b;
    }
    public float add(float a, float b) {
        System.out.println("a+b的float："+(a+b));
        return a + b;
    }
    public double add(double a, double b) {
        System.out.println("a+b的double："+(a+b));
        return a + b;
    }
    public String add(String a, String b) {
        System.out.println("a+b的dString："+(a+b));
        return a + b;
    }

}
